
package com.example.cia.database.mysql.dao;

import java.io.IOException;
import java.sql.SQLException;

public interface IDeviceDAO {

	/**
	 * add device info to database
	 * @param id device identifier
	 * @param description device description like how to judge the state
	 * @param state device state
	 * @return 1 if succeed,0 if failed
	 * @throws ClassNotFoundException
	 * @throws SQLException
	 * @throws IOException
	 */
	int add(String id, String description,int state) throws ClassNotFoundException, SQLException, IOException;

	/**
	 * modifies a device state
	 * @param id device identifier
	 * @param state device state being changed
	 * @return 1 if succeed,0 if failed
	 * @throws SQLException 
	 */
	int modify(String id,int state) throws SQLException;
}
